<include target="_header.html" />
<include target="_my_account_sidebar.html" />

<div id="body-content" class="body-two-columns main-content">
    <h1 class="underline">{$lang->my_orders}</h1>

    <table border="0" cellspacing="0" cellpadding="0" summary="{$lang->content_list}">
        <thead>
            <tr>
                <th scope="col" class="a-left">{$lang->order_number}</th>
                <th scope="col" class="a-center">{$lang->purchased_on}</th>
                <th scope="col" class="a-center">{$lang->bill_to_name}</th>
                <th scope="col" class="a-center">{$lang->total}</th>
                <th scope="col" class="a-center">{$lang->status}</th>
                <th scope="col" class="a-center" width="21%">{$lang->actions}</th>
            </tr>
        </thead>
        <tbody>
            <tr cond="empty($orders)">
                <td class="no-data" colspan="6"><p>{$lang->no_orders}</p></td>
            </tr>
            <!--@foreach($orders as $order)-->
            <tr>
                <td class="a-left"># {$order->order_srl}</td>
                <td class="a-center">{zdate($order->regdate)}</td>
                <td class="a-center">{reset(explode(',',$order->billing_address))}</td>
                <td class="a-center">{ShopDisplay::priceFormat($order->total, $shop->getCurrencySymbol())}</td>
                <td class="a-center">{$order->order_status}</td>
                <td class="a-center">
                    <a class="button" href="{getUrl('','act','dispShopViewOrder','order_srl',$order->order_srl)}">{$lang->read}</a>&nbsp;
                    <a class="button" title="This will fill your cart with the products existing on this order so you can buy them again" href="{getUrl('','act','procShopRenewOrder','order_srl',$order->order_srl)}">{$lang->renew}</a>
                </td>
            </tr>
            <!--@end-->
        </tbody>
    </table>
    <!-- Pagination -->
    <!--@if($page_navigation)-->
    <!--@if($page==null)-->{@$page=1;}<!--@end-->
    <div class="pagination inside-content" cond="count($orders)">
        <a href="{getUrl('page','','mid',$mid)}" class="prev">&laquo; {$lang->first_page}</a>
        <!--@while($page_no = $page_navigation->getNextPage())-->
        <!--@if($page == $page_no)-->
        <span>{$page_no}</span>
        <!--@else-->
        <a href="{getUrl('page',$page_no,'mid',$mid)}" class="number">{$page_no}</a>
        <!--@end-->
        <!--@end-->
        <a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="next">{$lang->last_page} &raquo;</a>
    </div>
    <!--@end-->
    <!-- /Pagination -->

</div>

<include target="_footer.html"/>